package com.example.zwh.computershop.sqlModel;

public class User {
	private int id;
	private String username;
	private String headPortraitUrl;
	private int role;
	private String password;
	private String email;
	private String phone;
	private String createTime;
	private String updateTime;
	
	public User() {
		this.role = 1;
		this.headPortraitUrl = "";
	}
	public void setAll(int id, String un, String hp, int ro, String ps, String em, String ph, String ct, String ut) {
		this.id = id;
		this.username = un;
		this.headPortraitUrl = hp;
		this.role = ro;
		this.password = ps;
		this.email = em;
		this.phone = ph;
		this.createTime = ct;
		this.updateTime = ut;
	}

	public String getHeadPortraitUrl() {
		return headPortraitUrl;
	}

	public void setHeadPortraitUrl(String headPortraitUrl) {
		this.headPortraitUrl = headPortraitUrl;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public int getRole() {
		return role;
	}

	public void setRole(int role) {
		this.role = role;
	}

	public String getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getUsername() {
		return username;
	}

	public String getPassword() {
		return password;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public void printInfo() {
		System.out.println("----------");
		System.out.println("id: " + id);
		System.out.println("username: " + username);
		System.out.println("headPortraitUrl: " + headPortraitUrl);
		System.out.println("role: " + role);
		System.out.println("password: " + password);
		System.out.println("phone: " + phone);
		System.out.println("email: " + email);
		System.out.println("updateTime: " + updateTime);
		System.out.println("createTime: " + createTime);
	}
	public void setUser(User user) {
		id = user.getId();
		username = user.getUsername();
		headPortraitUrl = user.getHeadPortraitUrl();
		role = user.getRole();
		password = user.getPassword();
		email = user.getEmail();
		phone = user.getPhone();
		createTime = user.getEmail();
		updateTime = user.getUpdateTime();
	}

}